package cn.china.xfood.controller;


import cn.china.xfood.service.WebInfoService;
import entity.Product;
import entity.Webinfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

@RestController
public class WebInfoController {


    @Autowired
    WebInfoService webInfoService;

    @RequestMapping("getWebData")
    public List<Webinfo> getCar(HttpServletResponse res){
        res.setHeader("Access-Control-Allow-Origin", "*");

        List<Webinfo> list = webInfoService.selectAll();

        return list;
    }


}
